/**
 * ListenerClass.java
 *
 * Copyright (c) 2010 Teamnet International All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Teamnet International .
 **/
package ro.prjmanager.core.list;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.impl.LogFactoryImpl;


import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.tagext.Tag;
import java.util.ArrayList;
import java.util.List;


public class ListenerTag extends BodyTagSupport {
    private static final Log log = LogFactoryImpl.getLog(ListenerTag.class);
    private String id;
    private String htmlId;
    private String eventName;
    private String filterHtmlId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getHtmlId() {
        return htmlId;
    }

    public void setHtmlId(String htmlId) {
        this.htmlId = htmlId;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getFilterHtmlId() {
        return filterHtmlId;
    }

    public void setFilterHtmlId(String filterHtmlId) {
        this.filterHtmlId = filterHtmlId;
    }

    public void setParent(Tag t) {
        super.setParent(t);
        List<ListenerTag> act=((ListTag)t).getListenerTagList();
        if(act==null)
            act=new ArrayList<ListenerTag>();
        act.add(this);
        ((ListTag)t).setListenerTagList(act);
    }

    public Tag getParent() {
        return super.getParent();
    }
}
